import VueI18n from 'vue-i18n'
import Vue from 'vue'
import elementZh from 'element-ui/lib/locale/lang/zh-CN'
import elementEn from 'element-ui/lib/locale/lang/en'
import zh from './zh.js'
import en from './en.js'
import cookieJs from 'js-cookie'
Vue.use(VueI18n)
const i18n = new VueI18n({
  locale: cookieJs.get('lang') || 'en',
  messages: {
    en: {
      obj: {
        xxx: 'home'
      },
      ...elementEn,
      ...en
    },
    zh: {
      obj: {
        xxx: '首页'
      },
      ...elementZh,
      ...zh
    }
  }
})
export default i18n

